package com.sdb.outpatient.service.impl;

import java.util.List;
import com.sdb.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sdb.outpatient.mapper.RegistrationMapper;
import com.sdb.outpatient.domain.Registration;
import com.sdb.outpatient.service.IRegistrationService;

/**
 * 挂号管理Service业务层处理
 * 
 * @author yyh
 * @date 2024-11-19
 */
@Service
public class RegistrationServiceImpl implements IRegistrationService 
{
    @Autowired
    private RegistrationMapper registrationMapper;

    /**
     * 查询挂号管理
     * 
     * @param reId 挂号管理主键
     * @return 挂号管理
     */
    @Override
    public Registration selectRegistrationByReId(Long reId)
    {
        return registrationMapper.selectRegistrationByReId(reId);
    }

    /**
     * 查询挂号管理列表
     * 
     * @param registration 挂号管理
     * @return 挂号管理
     */
    @Override
    public List<Registration> selectRegistrationList(Registration registration)
    {
        return registrationMapper.selectRegistrationList(registration);
    }

    /**
     * 新增挂号管理
     * 
     * @param registration 挂号管理
     * @return 结果
     */
    @Override
    public int insertRegistration(Registration registration)
    {
        registration.setCreateTime(DateUtils.getNowDate());
        return registrationMapper.insertRegistration(registration);
    }

    /**
     * 修改挂号管理
     * 
     * @param registration 挂号管理
     * @return 结果
     */
    @Override
    public int updateRegistration(Registration registration)
    {
        return registrationMapper.updateRegistration(registration);
    }

    /**
     * 批量删除挂号管理
     * 
     * @param reIds 需要删除的挂号管理主键
     * @return 结果
     */
    @Override
    public int deleteRegistrationByReIds(Long[] reIds)
    {
        return registrationMapper.deleteRegistrationByReIds(reIds);
    }

    /**
     * 删除挂号管理信息
     * 
     * @param reId 挂号管理主键
     * @return 结果
     */
    @Override
    public int deleteRegistrationByReId(Long reId)
    {
        return registrationMapper.deleteRegistrationByReId(reId);
    }
}
